<?php

function lib_send_email_html_phpmailer($to,$subject,$body,$charset=null){
		
	include_once(DOCUMENT_ROOT.'/plugins/PHPMailer/class.phpmailer.php');

	$mail = new PHPMailer();
	$mail -> CharSet=($charset?$charset:PAGE_CHAR_SET);
	$mail -> SetLanguage('en',DOCUMENT_ROOT.'/plugins/PHPMailer/language/');

	$mail -> IsSMTP();
	$mail -> SMTPAuth = true;
	$mail -> Host = MAIL_HOST_SMTP;
	$mail -> Port = MAIL_HOST_PORT;
	$mail -> From = MAIL_MAIL_ADDRESS;
	$mail -> FromName = MAIL_FROMNAME;
	$mail -> Username = MAIL_USER;
	$mail -> Password = MAIL_PASSWORD;
	$mail -> Subject = $subject;
	$mail -> AltBody = 'test/html';
	$mail -> Body = $body;
	$mail -> IsHTML(true);
	$mail -> AddReplyTo($to);
	$mail -> AddAddress($to);
	
	return $mail -> Send();
	
	
}







?>